import { request } from "@/utils/service"

/** 角色列表 */
export function getRoleListApi(data: any) {
  return request({
    url:"/system/role/list",
    method: "POST",
    data
  })
}

/** 新增角色 */
export function addRoleApi(data: any) {
  return request({
    url:"/system/role/insert",
    method: "POST",
    data
  })
}
/** 删除角色 */
export function delRoleApi(data: any) {
  return request({
    url:"/system/role/delete",
    method: "POST",
    data
  })
}

/** 修改角色 */
export function editRoleApi(data: any) {
  return request({
    url:"/system/role/update",
    method: "POST",
    data
  })
}

/** 角色详情 */
export function detailsRoleApi(data) {
  return request({
    url:"/system/role/details",
    method: "POST",
    data
  })
}

/** 对应角色部门树列表 */
export function treeRoleDeptApi(data) {
  return request({
    url:"/system/role/dept/tree",
    method: "POST",
    data
  })
}

/** 分配角色数据权限 */
export function scopeRoleApi(data) {
  return request({
    url:"/system/role/data/scope/update",
    method: "POST",
    data
  })
}
